This invention generally relates to resizing of content within documents. In one particular application, document content is segmented into objects, wherein each object is assigned a class value. The objects can be located and resized based at least in part upon the class value associated therewith. It is to be appreciated, however, that substantially any systems and methods are contemplated.
The creation of documents via digital means is generally accomplished utilizing computer-based production tools. Each document can contain a variety of content types such as text, images, graphics, logos and whitespace (e.g., background). Resizing of some or all of this content can be desired to accommodate a wide range of applications that includes varying source resolutions and/or the requirement of rendering on different paper sizes. For example, an emphasis on text may be desired for relatively smaller renderings of a document. In contrast, an emphasis on images may be desired for relatively larger renderings.
The process of resizing digital content, such as an image, is referred to as scaling. Conventional approaches to resize content to a target dimension typically employs isomorphic or anamorphic scaling based on well established and simple signal processing principles. These processes typically involve a tradeoff between efficiency, smoothness and sharpness. As the size of an image is increased, the pixels which comprise the image become increasingly visible, causing unwanted artifacts to appear.
There are several methods, however, to increase the number of pixels that an image contains to attempt to even out the appearance of the original pixels. In one approach, a nearest neighbor interpolation can be employed to double the size of an image. In this method, every pixel is replaced with four pixels of the same color. The resulting image is larger than the original and preserves all the original details but has undesirable jaggedness. Moreover, diagonal lines can appear to show a characteristic stairway shape.
Interpolation techniques can be utilized to provide better results than a nearest neighbor system to change the size of an image. Such techniques, however, can cause undesirable softening of details and can still render a somewhat jagged image. Bicubic interpolation or an hqx scaling algorithm can be utilized to compensate for such deficiencies. Such methods can produce sharp edges and maintain a high level of detail when executing rescaling operations.
While these techniques are fast and simple, limitations are well known in that they do not respect underlying image content and resizing. For this reason, content aware image resizing methods have been developed recently, such as U.S. patent application Ser. No. 12/533,880, filed Jul. 31, 2009; Ser. No. 12/330,879, filed Dec. 9, 2009; Ser. No. 12/369,790, filed Feb. 12, 2009; and, Ser. No. 12/544,561, filed Aug. 20, 2009, all incorporated herein by reference. The philosophy of these techniques can be summarized in two steps. First, a geometric and/or entropic descriptor is utilized to quantify relative importance of image pixels. Second, connected paths of low importance pixels are determined to the image called seams that have low energy.
Energy is determined as a summed up importance of pixels and selective dropping of these low energy seams can reduce size. For example, U.S. patent application Ser. No. 12/533,880 proposes notions of pixel importance that are well adapted based on application. U.S. patent application Ser. Nos. 12/330,879 and 12/369,790 focus on selective removal of image seams based on image content, such as the optimization of document content. Finally, U.S. patent application Ser. No. 12/544,561 performs reduction based on knowledge of constituent object types for pdf documents. These references, however, are only focused on one aspect of resizing—image reduction.
Unfortunately, utilizing such methods for image enlargement is not as straight forward. For example, one could conceivably construct an image importance map and insert seams in high importance areas. Unfortunately, this approach is fundamentally limited by the lack of information available for insertion into the high importance area. For this reason, repetition of adjacent pixels does not provide amplification. The result instead is a highly noticeable and undesirable geometric distortion. An alternative approach, proposed in Aviden, Shai and Shamir, Ariel 2007 Seam Carving for Content-Aware Image Resizing, inserts seams again in low importance areas. The philosophy is that when images are reduced using a content-aware technique, the new enlarged image yields the original one as a result. This approach, however, does not achieve amplification of particular (e.g., visually important) content.
Accordingly, systems and methods are needed to optimally resize particular content within a document.